test= function(array) {
    const app = array
    const upper = []
    const low = []
    const other = []

    for (let index = 0; index < array.length; index++) {
        const element = array[index];
        const code = element.charCodeAt(0)

        if (code >= 65 && code <=96) {
            upper.push(element)
        } else if (code >= 97 && code <= 122) {
            low.push(element)
        } else {
            other.push(element)
        }
    }
let flag1 = upper.length
let flag2 = low.length
console.log("大写字母数量:"+ flag1)
console.log("小写字母数量:"+ flag2)

for (let index = 0; index < flag1; index++) {
    const element = upper[index]
    console.log(element)
}


}

test("abcEFG")